<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
			var user = {}; 
			user.id = "1001"; 
			user.name = "李真";
			user.gender = "男";
			user["age"] = 20;
            if ("age" in user) {
				flag = "user对象中有age属性";
			} else {
				flag = "user对象中没有age属性";
			}
			document.write(flag + "<br />"); 
			delete user["gender"];
			if (user.hasOwnProperty("gender")) {
				flag = "有gender属性";
			} else {
				flag = "无gender属性";
			}
			document.write(flag);  
		</script>
	</head>
	<body>
	</body>
</html>
